package main

import (
	"log"

	"github.com/Unknwon/goconfig"
)

func main() {
	cfg, err := goconfig.LoadConfigFile("conf.ini")
	if err != nil {
		log.Fatal(err)
	}
	//读取单个值
	value, err1 := cfg.GetValue("mysql", "username")
	log.Print(value, err1)
	// valut, err2 := cfg.Int("must", int)
	//读取整个区
	sec, err3 := cfg.GetSection("mysql")
	log.Print(sec, err3)
}
